Class SimpleTestJRuby

      def setRate(rate)
      @rate=rate
      end

      def calculate(amount,year)
         amount*year*@rate
       end
 end

  SimpleTestJRuby.new